home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
shazam11.zip
/
ED.VIR
< prev
next >
Wrap
Text File
|
1991-11-04
|
2KB
|
62 lines
{===================================================================
VARIABLES & OBJECTS
===================================================================}
const
HeapSize = 32 * ( 1024 div 16 ) ;
var
ClipWindow : PEditWindow ;
{===================================================================
Steal heap for editor
===================================================================}
procedure TEDApp.PreInit ;
var
H : word ;
begin
H := PtrRec ( HeapEnd ).Seg -
PtrRec ( HeapPtr ).Seg ;
if H > HeapSize then
BufHeapSize := H - HeapSize
else
BufHeapSize := 0 ;
InitBuffers ;
end ;
procedure TEDApp.PostInit ;
begin
DisableCommands ( [ cmSave,
cmSaveAs,
cmCut,
cmCopy,
cmPaste,
cmClear,
cmUndo,
cmFind,
cmReplace,
cmSearchAgain ] ) ;
EditorDialog := DoEditDialog ;
ClipWindow := OpenEditor ( '' , FALSE ) ;
if ClipWindow <> NIL then
begin
Clipboard := ClipWindow^.Editor ;
Clipboard^.CanUndo := FALSE ;
end ;
if ParamCount = 0 then EXIT ; { no filespec }
if ( Pos ( '*' , ParamStr ( 1 ) ) = 0 ) and
( Pos ( '?' , ParamStr ( 1 ) ) = 0 ) then
OpenEditor ( ParamStr ( 1 ) , TRUE ) ; { no wildcards }
end ;
{===================================================================
DONE
===================================================================}
procedure TEDApp.PostDone ;
begin
DoneBuffers ;
writeln ( 'SYNTAX: C:>program filename' ) ;
end ;